import os.path
import os

src_file = os.path.join('E:\\kh\\wallpaper','1301270924-The-Dark-Knight-dark-knight-1920x1080.jpg')

#创建文件夹
dest_dir = os.getcwd()+'\\img'
if not os.path.exists(dest_dir):
    os.makedirs(dest_dir)

dest_file = os.path.join(dest_dir,os.path.basename(src_file))

with open(src_file,'rb') as f1:
    with open(dest_file,'wb') as f2:
        for data in f1:
            f2.write(data)